<?php

class UploadApp extends BackendApp
{

	function index(){

		if (isset($_FILES["video-blob"])) {

			$fileName = $_POST["video-filename"];
			$uploadDirectory = ROOT_PATH."/data/uploads/".gmtime().$fileName;

			if (!move_uploaded_file($_FILES["video-blob"]["tmp_name"], $uploadDirectory)) {
				echo("problem moving uploaded file");
			}

			echo("/data/uploads/".gmtime().$fileName);

		}
	}
}
